package com.qianfeng.demo1.controller;

import com.qianfeng.demo1.util.MyException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProductController {
    @RequestMapping("/list")
    public String list() throws MyException {
        if(true) {
            throw new MyException("E100101");
        }
        return "list";
    }

    @RequestMapping("/delete")
    public String delete() throws MyException {
        if(true) {
            throw new MyException("E100102");
        }

//        Exception;
        return "delete";
    }
}
